package com.hopu.v1.controller.front.personal;


import com.hopu.v1.pojo.common.R;
import com.hopu.v1.service.front.personal.FErrorNoteBookOptionService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/front/errorNoteBookOption")
public class FErrorNoteBookOptionController {

    @Resource
    private FErrorNoteBookOptionService errorNoteBookOptionService;

    /**
     * 根据题目id查询该题目的选项
     * @param questionId
     * @return
     */
    @GetMapping
    public R getQuestionOptions(Integer questionId){
        System.out.println("questionId = " + questionId);
        return  R.ok(errorNoteBookOptionService.query().eq("error_notebook_id",questionId).list());
    }


}
